import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
testCase="DBshop016_删除侧边设置流程"
firefox=openBrowser(url)
firefox.get(urlAdmin)
DBshopLoginAdmin(firefox)
# 商品管理管理分类前台侧边设置编辑
DBshopEnterMenu3(firefox,'商品管理','管理分类','前台侧边设置')
# 1.点击“删除”按钮，确定删除，删除成功。
firefox.find_element_by_xpath("//td[contains(.,'%s')]/following-sibling::td[3]/a[2]"%'网站很好看').click()
firefox.switch_to.alert.accept()
firefox.refresh()
try:
    firefox.find_element_by_xpath("//td[contains(.,'网站很好看')]")
    writeLog("%s 测试失败"%testCase)
    getPhoto(firefox)
except:
    writeLog("%s 测试通过" % testCase)
firefox.quit()
